3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
Figure 15 shows a NURB patch.
Uns32 uOrder
Uns32 vOrder
Uns32 numMPoints
Uns32 numNPoints
RationalPoint4D points[numMPoints * numNPoints]
Float32 uKnots[uOrder + numMPoints]
Float32 vKnots[vOrder + numNPoints]
A NURB patch is a three-dimensional surface defined by ratios of B-spline surfaces, which are three-dimensional analogs of B-spline curves.
The default surface parameterization of a NURB patch is as shown in Figure 15 .
Trim curves (optional). A trim curves object is a collection of two-dimensional NURB curves that are used to trim a NURB surface. See "Trim Loops" , and "2D NURB Curves" , for descriptions of these objects.
NURBPatch (
4 #uOrder
4 #vOrder
4 #numMPoints
4 #numNPoints
-2 2 0 1 -1 2 0 1 1 2 0 1 2 2 0 1 #points
-2 2 0 1 -1 2 0 1 1 0 5 1 2 2 0 1
-2 -2 0 1 -1 -2 0 1 1 -2 0 1 2 -2 0 1
-2 -2 0 1 -1 -2 0 1 1 -2 0 1 2 -2 0 1
0 0 0 0 1 1 1 1 #uKnots
0 0 0 0 1 1 1 1 #vKnots
)
The control points of a NURB patch are listed in a rectangular order, first in order of increasing v , then in order of increasing u .
Previous | QD3D Book | Overview | Chapter Contents | Next |